@tailwind base;
@tailwind components;
@tailwind utilities;

/* 基础样式重置 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 确保渐变背景正确显示 */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important;
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops)) !important;
}

/* 自定义渐变色变量 */
:root {
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-warning: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --gradient-error: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-info: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* 强制应用渐变背景 */
.gradient-primary {
  background: var(--gradient-primary) !important;
}

.gradient-secondary {
  background: var(--gradient-secondary) !important;
}

.gradient-success {
  background: var(--gradient-success) !important;
}

.gradient-warning {
  background: var(--gradient-warning) !important;
}

.gradient-error {
  background: var(--gradient-error) !important;
}

.gradient-info {
  background: var(--gradient-info) !important;
}

/* 毛玻璃效果 */
.backdrop-blur-xl {
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* 阴影效果 */
.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* 动画效果 */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* 确保透明度正确 */
.bg-white\/70 {
  background-color: rgba(255, 255, 255, 0.7) !important;
}

.bg-white\/80 {
  background-color: rgba(255, 255, 255, 0.8) !important;
}

.bg-white\/90 {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

/* 边框透明度 */
.border-gray-200\/50 {
  border-color: rgba(229, 231, 235, 0.5) !important;
}

/* 具体的渐变色类 */
.from-indigo-50 {
  --tw-gradient-from: #eef2ff !important;
  --tw-gradient-to: rgba(238, 242, 255, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.via-white {
  --tw-gradient-to: rgba(255, 255, 255, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), #ffffff, var(--tw-gradient-to) !important;
}

.to-purple-50 {
  --tw-gradient-to: #faf5ff !important;
}

.from-blue-600 {
  --tw-gradient-from: #2563eb !important;
  --tw-gradient-to: rgba(37, 99, 235, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.to-purple-600 {
  --tw-gradient-to: #9333ea !important;
}

/* 按钮悬停效果 */
.hover\:scale-105:hover {
  transform: scale(1.05) !important;
}

/* 过渡效果 */
.transition-all {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.duration-300 {
  transition-duration: 300ms !important;
}

.duration-500 {
  transition-duration: 500ms !important;
}

/* 圆角 */
.rounded-3xl {
  border-radius: 1.5rem !important;
}

.rounded-2xl {
  border-radius: 1rem !important;
}

.rounded-xl {
  border-radius: 0.75rem !important;
}